#!/usr/bin/env python


class Base(object):
    """
    Base Model class

    Provides a nicer representation when a class instance is printed.
    Found on the SqlAlchemy wiki.
    """

    def __repr__(self):
        return "%s:\n    %s" % (
            self.__class__.__name__,
            '\n    '.join(["%s: %r" % (key, getattr(self, key))
                           for key in sorted(self.__dict__.keys())
                           if not key.startswith('_')]))
